<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            width:100px;
            height:100px;
            background:yellow;
            transition:width 2s;
            line-height: 100px;
            text-align: center;
        }
        div:hover {
            width:300px;
            text-align: center;
        }
    </style>
</head>
<body>
<div>看这里！</div>
</body>
</html>